<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

	<head>
		<title>贵阳鼎视科技B2B系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	</head>

	<body>

		<link type="text/css" rel="stylesheet" href="css/login.css"></link>
		<link type="text/css" rel="stylesheet" href="css/SpryAssets/SpryAccordion.css"></link>
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/SpryAssets/SpryAccordion.js"></script>
		<style type="text/css">
			.button2 {
				height: 30px;
				width: 100px;
			}
			
			.tableborder {
				border: 1px solid #999;
			}
			
			.checkResult {
				display: none;
			}
			
			.password_header {
				height: 69px;
				width: 780px;
				margin: 0 auto;
				background: url(images/bg_head_password.png) top right no-repeat;
			}
			
			.password_header span {
				margin-top: 10px;
				background: url(images/login_logo.png) center no-repeat;
				width: 183px;
				height: 48px;
				float: left;
			}
			
			.reg_mid {
				margin: 0 auto;
				width: 780px;
				overflow: hidden;
				margin-top: 60px;
			}
			
			.mid_t {
				width: 780px;
				height: 10px;
				overflow: hidden;
				background: url(images/passbg_top.png) center no-repeat;
			}
			
			.mid_c {
				border-left: 1px solid #a9a9a9;
				border-right: 1px solid #a9a9a9;
				width: 678px;
				padding: 30px 50px;
				min-height: 300px;
				_height: 300px;
				background: white;
				position: relative;
			}
			
			.mid_b {
				width: 780px;
				height: 10px;
				overflow: hidden;
				background: url(images/passbg_bottom.png) center no-repeat;
			}
			
			.mid_t p {
				font-size: 16px;
				font-weight: bolder;
				color: white;
				text-align: left;
				background-color: #60A61C;
				margin-top: 0px;
			}
			
			.pass_title {
				height: 49px;
				font-family: "微软雅黑";
				font-size: 16px;
				color: #606365;
				padding: 0 0 0 10px;
			}
			
			.pass_title_img {
				background: url(images/password.JPG) no-repeat;
				width: 48px;
				height: 48px;
				float: left;
			}
			
			.pass_font {
				float: left;
				margin-left: 10px;
				font-weight: bold;
				line-height: 48px;
			}
			
			.return_title {}
			
			.pas_header {
				width: 100%;
				height: 72px;
				margin-top: 20px;
				border-bottom: 2px solid #db0000;
			}
			
			.grid-990 {
				margin: 0 auto;
				width: 990px;
				background: url(images/login_logo.jpg) no-repeat;
				height: 55px;
			}
		</style>
		<div class="pas_header">
			<div class="grid-990"></div>
		</div>
		<div class="reg_mid">
			<div class="mid_t"></div>
			<div class="mid_c">
				<div class="pass_title">
					<div class="pass_title_img"></div>
					<div class="pass_font">找回密码</div>
				</div>
				<div>
					<div>
						<div>
							<table width="100%" cellspacing="0" style="margin-top:30px;" border="0">
								<tr>
									<td width="30%" align="right" height="30">请输入您的用户名：</td>
									<td width="70%" align="left" height="30"><input type="text" id="user_name" style="width:200px;" name="user_name"></input>
									</td>
								</tr>
								<tr>
									<td align="right" height="50">请输入您的邮件地址：</td>
									<td align="left" height="50"><input class="login-input" type="email" id="FP_email" style="width:200px;" name="email" value=""></input>
									</td>
								</tr>
								<tr>
									<td width="40%" height="50"></td>
									<td width="60%" height="50">
										<div class="button" id="FP_SendEmailVarificationCode">下一步</div>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</div>
			</div>
			<div class="mid_b"></div>
			<div style="clear:both;"></div>
		</div>
		<script type="text/javascript">
			function encodeString(s) {
				if (/["\\\x00-\x1f]/.test(s)) {
					return '"' + s.replace(/([\x00-\x1f\\"])/g, function(a, b) {
						var c = m[b];
						if (c) {
							return c;
						}
						c = b.charCodeAt();
						return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
					}) + '"';
				}
				return '"' + s + '"';
			}
			$(document).ready(function() {
				$('#FP_SendEmailVarificationCode').click(function() {
					var user_name = $('#user_name').val();
					var user_email = $('#FP_email').val();
				if (user_name == "") {
					alert("用户名不能为空");
					return;
				};
				if (email == "" || email.contains("@")) {
					alert("邮箱地址输入有误");
					return;
				};
				$.post("php/found_password.php", {
						name: user_name,
						email: user_email
					},
					function(data, status) {
						if (data == 1) {
							window.location.href = 'home.html';
							jQuery.setCookie('user_name', user_name);
						} else {
							alert("用户名或密码不对");
						}
					});
					
				});
			});
		</script>
	</body>

</html>